import requests
from util.chaojiying import get_code_base64,get_money

img_base64_result = requests.get('https://www.labnetwork.com.cn/gateway/basic/mall/oauth/code?0.5287760914546367')
img_base64 = img_base64_result.json()['data']['img'][22:]
uuid = img_base64_result.json()['data']['uuid']

cade = get_code_base64(img_base64, 1902)
print(cade)

login_res = requests.post('https://www.labnetwork.com.cn/gateway/basic/mall/oauth/login', json={
    "userEmail": "2094729537@qq.com",
    "password": "zdz123123",
    "captchaCode": cade['pic_str'],
    "captchaKey": uuid
})
if login_res.json()['status'] == 190004:
    print('验证码识别失败')
    get_money(cade['pic_id'])
else:
    login_res.json()

